import React,{Component, PropTypes} from 'react';
import ReactDom from 'react-dom';

var InputSearch = React.createClass({
    propTypes: {
        placeHolder: React.PropTypes.string,  //placeholder提示词
        getSubmit: React.PropTypes.func  //搜索提交函数
    },
    render(){
        return (
            <form className="search-form" onSubmit={this.props.getSubmit}>
                <label htmlFor="searchID" className="icon-search"></label>
                <input type="text" id="searchID" placeholder={this.props.placeHolder}/>
            </form>
        )
    }
});

module.exports = InputSearch;